import request from '@/utils/request'

export function listTest(data) {
  return request({
    url: '/admin/HtTest/list',
    method: 'post',
    data
  })
}
// get 方式获取列表
export function getListTest(params) {
  return request({
    url: '/test/test/getList',
    method: 'post',
    params
  })
}

export function updateTest(data) {
  return request({
    url: '/admin/HtTest/update',
    method: 'put',
    data
  })
}

export function addTest(data) {
  return request({
    url: '/admin/HtTest/create',
    method: 'post',
    data
  })
}

export function delTest(data) {
  return request({
    url: '/admin/HtTest/delete',
    method: 'post',
    data
  })
}

// 单个实体 用于展示
export function oneTest(id) {
  return request({
    url: '/admin/HtTest/info',
    method: 'get'
  })
}

/**
 * 获取实体用于编辑
 * @param id
 * @returns {AxiosPromise}
 */
export function oneTestForEdit(id) {
  return request({
    url: '/admin/HtTest/' + id,
    method: 'get'
  })
}
